home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 6556 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  679 b 

  1. Path: news.uni-c.dk!news
  2. From: i3200@dc.dk (Henrik Mouritsen)
  3. Newsgroups: comp.lang.c++
  4. Subject: multidimensional array - supscipt operator overload
  5. Date: Fri, 09 Feb 1996 11:00:32 GMT
  6. Organization: Datacentralen A/S
  7. Message-ID: <4ff99q$pth@news.uni-c.dk>
  8. NNTP-Posting-Host: pc3200.dc.dk
  9. X-Newsreader: Forte Free Agent v0.46
  10.  
  11. Does anyone out there know of a way to implement a class that defines
  12. multidimensional arrays. 
  13. Im interested in overloading subscipt operator to enable me to do
  14. something like:
  15.  
  16. Table X(row, col);        // 2 dimensional table
  17.  
  18. String a, b;
  19.  
  20. a = X[1][1];
  21. X[1][1] = b;
  22.  
  23. The class dosesnt have to be of template character, but it would be a
  24. plus of course.  
  25.  
  26.